<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Rag Hu
 * Created Time: 2019/10/19 11:15
 * Modified Time: 2019/10/19 11:15
 * Version: 2.0
 */

namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class Bill extends Model
{
    protected $table = 'bill';

    protected $guarded = [];

    public function user()
    {
        return $this->hasOne(User::class,'id','user_id');
    }

    public function main_recommend()
    {
        return $this->hasOne(User::class,'id','main_recommend');
    }

    public function assist_recommend()
    {
        return $this->hasOne(User::class,'id','assist_recommend');
    }


    public function order()
    {
        return $this->hasOne(Order::class,'id','order_id');
    }



    public function memberCardOrder()
    {
        return $this->hasOne(MemberCardOrder::class,'id','order_id');
    }



    public function goodsOrder()
    {
        return $this->hasOne(GoodsOrder::class,'id','order_id');
    }
}